Skip to content

Narrow dotted block argument diagnostics - #1311

Merged
charlespwd merged 2 commits into
mainfrom
block-argument-diagnostic-range
Sep 30, 2026
Merged

charlespwd merged 2 commits into
mainfrom
block-argument-diagnostic-range

Conversation

@charlespwd

Copy link
Copy Markdown
Contributor

In this PR

Narrow the LiquidSyntaxError diagnostic for unsupported dotted block arguments to the first offending argument.

Problem

Theme Check correctly rejects caller arguments such as block.settings.heading: value, but it reports the full LiquidTag range. For a body-form invocation, the editor underlines the opening tag, all inline children, and the closing tag instead of the syntax that needs to change.

Solution

The block syntax check now locates the message and range together. Unsupported dotted arguments use the first invalid argument's range. Other block syntax errors keep their existing full-tag ranges.

blockTagSyntaxError() keeps its current signature and rule ordering, so the other block parameter checks still suppress cascading diagnostics and each malformed tag still produces one syntax error.

This includes a patch changeset for @shopify/theme-check-common.

@charlespwd
charlespwd marked this pull request as ready for review September 30, 2026 12:24
@charlespwd
charlespwd requested a review from a team as a code owner September 30, 2026 12:24

@karreiro karreiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @charlespwd!

@charlespwd
charlespwd merged commit cb2f481 into main Sep 30, 2026
8 checks passed
@charlespwd
charlespwd deleted the block-argument-diagnostic-range branch September 30, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants